﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DXApplicationTangche.UC.金蝶
{
    public partial class Form订单对应BOM : DevExpress.XtraEditors.XtraForm
    {
        private List<EBOMGroupQueryFacadeDTO> eBOMGroupQueryFacadeDTOs = new List<EBOMGroupQueryFacadeDTO>();
        public Form订单对应BOM(String styleName, String materialNo, Double orderNumber)
        {
            InitializeComponent();
            this.gridControlBOM展示.DataSource = 金蝶BOMService.getSpuBom(styleName, materialNo, orderNumber);
            this.gridViewBOM展示.RefreshData();
        }
        public Form订单对应BOM(String orderId)
        {
            InitializeComponent();
            this.eBOMGroupQueryFacadeDTOs = 金蝶BOMService.getEBOMGroupQueryFacadeByOrderId(orderId);
            if(this.eBOMGroupQueryFacadeDTOs.Count == 0)
            {
                this.label提示.Text = "该款式暂无物料清单，请尽快补充";
            }
            else
            {
                this.gridControlBOM展示.DataSource = this.eBOMGroupQueryFacadeDTOs;
                this.gridViewBOM展示.RefreshData();
            }     
        }
    }
}
